# -*- coding: utf-8 -*-
from common.helper import Helper
from db.mysql import MysqlClient

class Arrangement( object ):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "复星乐享一生长期百万医疗险（5年期）"
    # 拉取数据
    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):
            data["name"] = self.name
            data["company"] = "复星联合健康保险"
            data["year"] = item["year"]
            data["gender"] = "1" if item["gender"] == "M" else "0"
            data["expire"] = item["expire"]
            data["interval"] = "0" if item["interval"] == "0C" else item["interval"]
            data["socialSec"] = item["socialSec"]
            data["hospitalMedical"] = "200w"
            data["cancerMedical"] = "200w"
            data["price"] = item["price"]
            Helper.mergeTable(self.name, self.mysql, data)
